#define _CRT_SECURE_NO_WARNINGS 1
#include "game.h"
void menu() {
	printf("*************************\n");
	printf("********1.开始游戏*******\n");
	printf("********0.停止游戏*******\n");
	printf("*************************\n");
	printf("*************************\n");
}
game() {
	//存放布置雷的数组
	char arr[ROWS][COLS];
	//存放周围雷有几个的数组
	char arr1[ROWS][COLS];
	//初始化
	chushihua(arr, ROWS, COLS,'0');
	chushihua(arr1, ROWS, COLS, '#');
	//打印棋盘
	dayin(arr1, ROW, COL);
	//放置雷
	lei(arr, ROW, COL);
	//玩家排查雷
	findMine(arr, arr1, ROW, COL);


}
int main() {
	int temp = 0;
	srand((unsigned int)time(NULL));
	do {
		menu();
		scanf("%d", &temp);
		switch (temp) {
		case 1:
			game();
			break;
		case 0:
			printf("游戏结束\n");
			break;
		default:
			printf("输入有错请重新输入\n");
			break;
		}
	}
	while (temp);
}1